package java2;

public class Teacher extends People {
	public String TeachLesson;  
	public String name;  
	public Teacher(int code, String name, char sex, String lesson) {
		super(code, name, sex); 
	    this.TeachLesson = lesson; 
	    this.name=name;
	    setName(name);  
	}  
	public String toString() {
		return "老师:" + getCode() + " 姓名:" + getName() + " 性别:" + getSex() + " 授课:" + TeachLesson;  
	}  
	}